<template>
<div class="container" ref="container">

</div>
</template>

<script>
import * as echarts from 'echarts';

export default {
  name: "EchartsPie",

  mounted() {
    //初始化Echarts实例
    let MyEcharts = echarts.init(this.$refs.container);
    //绘制图标
    MyEcharts.setOption({
      series: [
        {
          type: 'pie',
          data: [
            {
              value: 100,
              name: 'A'
            },
            {
              value: 200,
              name: 'B'
            },
            {
              value: 300,
              name: 'C'
            },
            {
              value: 400,
              name: 'D'
            },
            {
              value: 500,
              name: 'E'
            }
          ],
          roseType: 'area'
        }
      ]
    })
  }
}
</script>

<style scoped>
.container{
  width: 100%;
  height: 30vh;
}
</style>